package org.csmzxy.class2333;

class myThread01 extends Thread{
    @Override
    public void run() {
        //循环输出当前线程的名称
         while (true){
             System.out.println("线程"+Thread.currentThread().getName()+":run()方法在运行");
             try {
                 //让当前线程休眠1000毫秒
                 Thread.sleep(1000);
             }catch (InterruptedException e){
                 e.printStackTrace();
             }
         }
    }
}
